package com.fh.auth.portal;

import org.jasig.cas.authentication.handler.BadUsernameOrPasswordAuthenticationException;

/**
 * Created by Yb on 2017/2/6.
 */
public class UnRegisterEmailAuthenticationException extends BadUsernameOrPasswordAuthenticationException {
    /**
     * Static instance ofUnknownUsernameAuthenticationException.
     */
    public static final UnRegisterEmailAuthenticationException ERROR = new UnRegisterEmailAuthenticationException();

    /**
     * Unique ID for serializing.
     */
    private static final long serialVersionUID = 3977861752513837361L;

    /**
     * The code description of thisexception.
     */
    private static final String CODE = "error.authentication.credentials.bad.unregister.email";

    /**
     * Default constructor that doesnot allow the chaining of exceptions and
     * uses the default code as theerror code for this exception.
     */
    public UnRegisterEmailAuthenticationException() {
        super(CODE);
    }

    /**
     * Constructor that allows forthe chaining of exceptions. Defaults to the
     * default code provided for thisexception.
     *
     * @param throwable the chainedexception.
     */
    public UnRegisterEmailAuthenticationException(final Throwable throwable) {
        super(CODE, throwable);
    }

    /**
     * Constructor that allows forproviding a custom error code for this class.
     * Error codes are often used toresolve exceptions into messages. Providing
     * a custom error code allows theuse of a different message.
     *
     * @param code the custom code touse with this exception.
     */
    public UnRegisterEmailAuthenticationException(final String code) {
        super(code);
    }

    /**
     * Constructor that allows forchaining of exceptions and a custom error
     * code.
     *
     * @param code      the custom errorcode to use in message resolving.
     * @param throwable the chainedexception.
     */
    public UnRegisterEmailAuthenticationException(final String code, final Throwable throwable) {
        super(code, throwable);
    }

}
